<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 200px;
            height: 200px;
        }
        .box1{
            border: 1px solid red;
            /* margin-bottom: 20px; */
        }
        .box2{
            /* margin-left: 20px;
            margin-top: 20px; */
            /* margin: 50px; */
            margin: 50px 100px;
            border: 1px solid blue;
        }

        .box3{
            border: 1px solid royalblue;
            /* 使盒子居中 */
            margin: 0 auto;
        }
        .box4{
            width: 30px;
            height: 200px;
            border: 1px solid royalblue;
            /* 使盒子居中 */
            margin:0 auto;
        }
    </style>
</head>
<body>
    <div class="box1 box">
        
    </div>
    <div class="box2 box">

    </div>
    <div class="box3 box">

    </div>
    <div class="box4" >

    </div>
</body>
</html>